package com.zhongfl.crm.service.impl;

import com.github.pagehelper.PageHelper;
import com.zhongfl.crm.mapper.LxProductMapper;
import com.zhongfl.crm.model.LxProduct;
import com.zhongfl.crm.request.LxProductRequest;
import com.zhongfl.crm.service.LxProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Objects;

/**
 * @author 向日葵
 * @Date 2018/9/20
 */
@Service
public class LxProductServiceImpl implements LxProductService {

    @Resource
    private LxProductMapper lxProductMapper;

    /**
     * 根据条件查询励销产品列表
     * @param lxProductRequest 查询条件
     * @return 产品列表
     */
    @Override
    public List<LxProduct> findProductList(LxProductRequest lxProductRequest) {
        PageHelper.startPage(lxProductRequest.getPage(), lxProductRequest.getPageSize());
        return lxProductMapper.selectProductList(lxProductRequest);
    }

    @Override
    public void insertProduct(LxProduct lxProduct) {

    }

    @Override
    public void deleteProductById(Long lxId) {

    }

    @Override
    public void updateProductById(LxProduct lxProduct) {

    }
}
